import G6 from '@antv/g6'

export default function () {
  G6.registerNode('pathNode', {
    draw(cfg, group) {
      const shape = group.addShape('rect', {
        attrs: {
          x: 0,
          y: 0,
          width: 0,
          height: 0,
          radius: 0,
        },
        // must be assigned in G6 3.3 and later versions. it can be any string you want, but should be unique in a custom item type
        name: 'path-node',
        draggable: false,
      })
      group.sort()
      return shape
    },
  })
}
